#ifndef ONBON_DRV_I2C_H
#define ONBON_DRV_I2C_H

#include "../../global/ObasicTypes.h"


#include "../global.h"
#include "../../utils/utils.h"

#include <linux/i2c.h>
#include <linux/i2c-dev.h>
#include <set>
#include <memory.h>
#include <stdio.h>
#include <unistd.h>
#include  <sys/select.h>
#include <termios.h>
#include <fcntl.h>
#include <stdio.h>
#include <stddef.h>


//for 6602/6805


class Drv_I2C0
{
public:
    Drv_I2C0();
    ~Drv_I2C0();

    //static Drv_I2C0* pInstance();

    int initialize() ;
    int i2c_write(int fd,unsigned char slave_addr, unsigned char reg_addr, unsigned char *value ,unsigned int len ) ;

    int i2c_read(int fd,unsigned char slave_addr, unsigned char reg_addr, unsigned char *value ,int len) ;
    //int i2c_read_at24c32d(int fd,unsigned char slave_addr, unsigned int reg_addr, unsigned char *value ,int len);
    //int i2c_write_at24c32d(int fd,unsigned char slave_addr, unsigned int reg_addr, unsigned char *value ,unsigned int len ) ;


    static Drv_I2C0* p_drv_i2c0;

};


#endif  // DRV_I2C.h
